<template>
	<custom-layout custom-class="custom-layout">
	
			
			<wd-cell-group border>
			
				<wd-cell title="姓名" >
					<view class="content">{{userStore.userInfo.nickname}}</view>
				</wd-cell>
				
				
			
			
				
			</wd-cell-group>
				
				
		<!-- 提交 -->
		<wd-button block size="large" custom-class="submit-button" @click="handleLogout">退出登录</wd-button>
		
	</custom-layout>
</template>

<script setup>
	import {
		useDictionaryStore,
		useUserStore
	} from '@/store/index.js'


	// 字典仓库
	const dictionaryStore = useDictionaryStore()
	// 用户仓库
	const userStore = useUserStore()
	
	// 退出登录
	const handleLogout = ()=>{
		userStore.logout()
		uni.reLaunch({
			url:'/packageA/pages/login/index'
		})
	}
	
</script>

<style lang="scss" scoped>
	// 自定义布局
	:deep(.custom-layout) {
		background: #F8F8F8;
	}

	// 提交按钮
	:deep(.submit-button) {
		margin: 32rpx;
	}
	.cell-title {
		font-size: 30rpx;
		font-weight: bold;
		margin: 24rpx;
		padding-left: 10rpx;
		position: relative;
	}
	.cell-title:before {
		content: "";
		position: absolute;
		left: -2px;
		top: 15%;
		height: 70%;
		width: 6rpx;
		background-color: #6a9cff;
	}
</style>